/**
**  @file boot_chip.h
**
**  @brief
**    This file defines the common api of boot module.
**
**  COPYRIGHT:
**    Ali Corp. All Rights Reserved. 2002 Copyright (C)
**
*/

#ifndef _BOOT_CHIP_H_
#define _BOOT_CHIP_H_

#ifdef __cplusplus
extern "C" {
#endif

/******************************************************************************/
/*                                                                            */
/*                              INCLUDE FILES                                 */
/*                                                                            */
/******************************************************************************/
#include <sys_config.h>
#include <basic_types.h>
#include <retcode.h>
#include <api/libc/string.h>
#include <osal/osal.h>

/******************************************************************************/
/*                                                                            */
/*                             MACROS DEFINITION                              */
/*                                                                            */
/******************************************************************************/
#define ALI_SOC_BASE            0xb8000000

#define STAGE_TRANSFER_ADDR0    0xA0000018
#define STAGE_TRANSFER_ADDR1    0xA000001C
#define STAGE_TRANSFER_ADDR2    0xA0000010
#define STAGE_TRANSFER_ADDR3    0xA0000014
#define ALI_TRANSFER_MAGIC_NUM  0xABCD5AA5
#define TRANS_SYSINFO_MAX_SIZE  0x1000

#define GET_DWORD(i)            (*(volatile UINT32 *)(i))
#define SET_DWORD(i, d)         (*(volatile UINT32 *)(i)) = (d)

/******************************************************************************/
/*                                                                            */
/*                             TYPES DEFINITIONS                              */
/*                                                                            */
/******************************************************************************/
enum TRANS_SYSINFO_TYPE
{
    TRANS_VDEC_TYPE = 0,
};

typedef struct TRANS_VDEC_INFO
{
	UINT16 pic_width;
	UINT16 pic_height;
	UINT32 aspect_ratio;
    UINT32 resv[4];
};

typedef struct TRANS_SYSINFO
{
    struct TRANS_VDEC_INFO vdec_info;  
};

enum BOOT_TYPE
{
	BOOT_TYPE_NOR = 0,
    BOOT_TYPE_NAND,
};

/******************************************************************************/
/*                                                                            */
/*                              GLOBE VARIABLE                                */
/*                                                                            */
/******************************************************************************/

/******************************************************************************/
/*                                                                            */
/*                             FUNCTION PROTOTYPES                            */
/*                                                                            */
/******************************************************************************/

#ifdef __cplusplus
 }
#endif

#endif /* _SAMPLE_H_ */


